#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "../umlcore/PartialElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Behavior;
class InterfaceRealization;

/// <summary>
/// BehavioredClassifier
/// A BehavioredClassifier may have InterfaceRealizations, and owns a set of
/// Behaviors one of which may specify the behavior of the BehavioredClassifier
/// itself.
/// </summary>
class UMLMODEL_EXPORT BehavioredClassifier : public PartialElement {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// classifierBehavior getter
    /// A Behavior that specifies the behavior of the BehavioredClassifier itself.
    /// </summary>
    shared_ptr<Behavior> classifierBehavior() const;

    /// <summary>
    /// classifierBehavior setter
    /// A Behavior that specifies the behavior of the BehavioredClassifier itself.
    /// </summary>
    void setClassifierBehavior(shared_ptr<Behavior> value);

    /// <summary>
    /// interfaceRealizations getter
    /// The set of InterfaceRealizations owned by the BehavioredClassifier. Interface
    /// realizations reference the Interfaces of which the BehavioredClassifier is an
    /// implementation.
    /// </summary>
    vector<shared_ptr<InterfaceRealization>>& interfaceRealizations();

    /// <summary>
    /// ownedBehaviors getter
    /// Behaviors owned by a BehavioredClassifier.
    /// </summary>
    vector<shared_ptr<Behavior>>& ownedBehaviors();

private: // Fields
    /// <summary>
    /// classifierBehavior
    /// A Behavior that specifies the behavior of the BehavioredClassifier itself.
    /// </summary>
    shared_ptr<Behavior> classifierBehavior_;

    /// <summary>
    /// interfaceRealizations
    /// The set of InterfaceRealizations owned by the BehavioredClassifier. Interface
    /// realizations reference the Interfaces of which the BehavioredClassifier is an
    /// implementation.
    /// </summary>
    vector<shared_ptr<InterfaceRealization>> interfaceRealizations_;

    /// <summary>
    /// ownedBehaviors
    /// Behaviors owned by a BehavioredClassifier.
    /// </summary>
    vector<shared_ptr<Behavior>> ownedBehaviors_;

};

} // namespace uml
